<template>
  <div>
    <div class="ammbB8tpRTlzwGu9Q8GNE _3PpmFreY8xlC6Z2Y0lcyk-">
      <div class="_1hh60i8CByuosza1JbgE0Q">
        <span>推荐阅读</span>
      </div>
      <div class="ant-spin-nested-loading">
        <div class="ant-spin-container">
          <ul class="_1PytTgSelvgOTMZR4ckInB">
            <li
              v-for="(item, index) in articleList"
              :key="index"
              @click="goArticleDetail(item.id)"
            >
              <a
                ><span>{{ item.title }}</span> · <span>8天前</span></a
              >
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["articleList"],
  components: {},
  methods: {
    goArticleDetail(id) {
      console.log(id);
      this.$router.push(`/archives/detail/${id}`);
    },
  },
};
</script>

<style scoped>
.ammbB8tpRTlzwGu9Q8GNE {
  margin-bottom: 1.3rem;
  line-height: 1.29;
  border-radius: var(--border-radius);
  background-color: var(--bg-second);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}
.ammbB8tpRTlzwGu9Q8GNE ._1hh60i8CByuosza1JbgE0Q {
  width: 256px;
  padding: 16px;
  border-bottom: 1px solid #ccc;
  color: var(--main-text-color);
  font-weight: 700;
}
.ammbB8tpRTlzwGu9Q8GNE ul._1PytTgSelvgOTMZR4ckInB {
  padding: 0 1rem 1rem;
}
.ammbB8tpRTlzwGu9Q8GNE ul._1PytTgSelvgOTMZR4ckInB li {
  display: flex;
  flex-wrap: nowrap;
  cursor: pointer;
  align-items: stretch;
  padding-top: 14px;
  color: var(--second-text-color);
}
.ammbB8tpRTlzwGu9Q8GNE ul._1PytTgSelvgOTMZR4ckInB li a {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  color: var(--second-text-color);
  font-size: 15px;
}
.ammbB8tpRTlzwGu9Q8GNE ul._1PytTgSelvgOTMZR4ckInB li a:hover {
  color: #ff0064;
}
</style>
